import React, { Component } from 'react'
import { withRouter } from 'react-router'

class LoginHint extends Component {
    render() {
        return (
            <div>
                <p className="login_hint_p">未进行登录 请登录后购买！！！</p>
                <button className="login_hint_btn" onClick={() => {
                    this.props.closeLoginHint()
                    let path = this.props.location.pathname
                    this.props.history.push({
                        pathname: '/login',
                        state: path,
                    })
                }}>登录</button>
            </div>
        )
    }
}

export default withRouter(LoginHint)
